package com.jinzecloud.fiction.constant;

import lombok.Data;

@Data
public class UserConstant {
    public enum User{
        //0-正常,1-封禁,2-异常,3-待处理,4-注销
        NORMAL("0","正常"),
        BANNED("1","封禁"),
        ABNORMAL("2","异常"),
        PENDING("3","待处理"),
        IN_HAND("4","处理中"),
        NUSUBSCRIBE("5","注销");


        private String code;
        private String msg;
        User(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public String getCode() {
            return code;
        }

//        public String getMsg() {
//            return msg;
//        }


        public static String getMsg(String code){
            for (User user : User.values()){
                if (code.equals(user.code)){
                    return user.msg;
                }
            }
            return null;
        }
    }
}
